﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.events.*;
    import flash.utils.*;
    import org.aswing.*;
    import Classes.*;
    import Display.*;
    import flash.text.*;
    import org.aswing.border.*;
    import Display.aswingui.*;

    public class ValentinesDayRewardDialogView extends GenericDialogView {

        public function ValentinesDayRewardDialogView(_arg1:Dictionary, _arg2:String="", _arg3:String="", _arg4:int=0, _arg5:Function=null, _arg6:String="", _arg7:int=0, _arg8:String="", _arg9:Function=null, _arg10:String=""){
            super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
        }
        override protected function makeBackground():void{
            var _local1:MarginBackground;
            if (m_bgAsset){
                _local1 = new MarginBackground(m_bgAsset, new Insets(0, 0, 10, 0));
                this.setBackgroundDecorator(_local1);
                this.setPreferredHeight(m_bgAsset.height);
                this.setMinimumHeight(m_bgAsset.height);
                this.setMaximumHeight(m_bgAsset.height);
            };
        }
        override protected function createInteriorHolder():JPanel{
            var _local3:JPanel;
            var _local1:JPanel = new JPanel(new SoftBoxLayout(SoftBoxLayout.Y_AXIS, -10, SoftBoxLayout.CENTER));
            var _local2:JPanel = createHeaderPanel();
            ASwingHelper.prepare(_local2);
            textArea = createTextArea();
            ASwingHelper.prepare(textArea);
            _local1.setBorder(new EmptyBorder(null, new Insets(0, 0, 0, 0)));
            if (m_type != TYPE_NOBUTTONS){
                _local1.append(_local2);
            };
            _local1.append(ASwingHelper.verticalStrut(15));
            _local1.append(textArea);
            _local1.append(ASwingHelper.verticalStrut(BUTTON_MARGIN));
            if (((!((m_type == TYPE_MODAL))) && (!((m_type == TYPE_NOBUTTONS))))){
                _local3 = this.createButtonPanel();
                _local1.append(_local3);
            };
            ASwingHelper.prepare(_local1);
            return (_local1);
        }
        override protected function createTitlePanel():JPanel{
            var _local2:String;
            var _local3:TextFormat;
            var _local1:JPanel = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER);
            m_titleFontSize = TextFieldUtil.getLocaleFontSize(30, 20, null);
            if (m_titleString != ""){
                _local2 = ZLoc.t("Dialogs", (m_titleString + "_title"));
                title = ASwingHelper.makeTextField(_local2, EmbeddedArt.TITLE_FONT, m_titleFontSize, EmbeddedArt.darkPinkTextColor, 3);
                title.filters = EmbeddedArt.valtitleFilters;
                _local3 = new TextFormat();
                _local3.size = m_titleSmallCapsFontSize;
                TextFieldUtil.formatSmallCaps(title.getTextField(), _local3);
                _local1.append(title);
                title.getTextField().height = (m_titleFontSize * 1.5);
                ASwingHelper.setEasyBorder(_local1, 19);
            } else {
                _local1.append(ASwingHelper.verticalStrut(10));
            };
            return (_local1);
        }
        override protected function createButtonPanel():JPanel{
            var _local1:JPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            m_acceptTextName.toUpperCase();
            var _local2:CustomButton = new CustomButton(m_acceptTextName, null, "PinkButtonUI");
            _local2.addActionListener(onAccept, 0, true);
            _local1.append(_local2);
            return (_local1);
        }
        override protected function createCloseButtonPanel():JPanel{
            var _local1:JPanel = new JPanel(ASwingHelper.softBoxLayoutVertical);
            var _local2:JButton = ASwingHelper.makeMarketCloseButton();
            _local2.addEventListener(MouseEvent.CLICK, onCancel, false, 0, true);
            _local1.append(_local2);
            if (m_titleString != ""){
                ASwingHelper.setEasyBorder(_local2, 13, 0, 0, 7);
            } else {
                ASwingHelper.setEasyBorder(_local2, 0, 0, 8, 4);
            };
            return (_local1);
        }

    }
}//package Display.DialogUI 
